public class FloatStack {

	private:
	int N;
	float[] data;
	int index=0;
	
	public:
	FloatStack(int n);
	bool push(float f);
	float pop();
	
	public FloatStack::FloatStack(int n) {
		this.N = n;
		this.data = data[N];
	}

	bool FloatStack::push(float f){
		if(index==N)
			return false;
		this.data[index]=f;
		index++;
		return true;
	}
	
	float FloatStack::pop(){
		if(index==0)
			return this.data[0];
		index--;
		return this.data[index];
	}
}
